namespace MathService
{
    public class ValuedInterval<TValue> : Interval
    {
        public TValue Value { get; set; }

        public ValuedInterval(double Min, double Max, TValue Value)
            : base(Min, Max) { this.Value = Value; }

        public ValuedInterval(double Min, double Max, bool IncludeLimits, TValue Value)
            : base(Min, Max, IncludeLimits) { this.Value = Value; }

        public ValuedInterval(double Min, bool MinInclude, double Max, TValue Value)
            : base(Min, MinInclude, Max) { this.Value = Value; }

        public ValuedInterval(double Min, bool MinInclude, double Max, bool MaxInclude, TValue Value)
            : base(Min, MinInclude, Max, MaxInclude) { this.Value = Value; }

        public ValuedInterval(Interval interval, TValue Value)
            : this(interval.Min, interval.MinInclude, interval.Max, interval.MaxInclude, Value) { }


        public override string ToString()
        {
            return string.Format("{0} - {1}", base.ToString(), Value);
        }
    }
}